package com.yzk.back.model.art;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.yzk.back.model.cate.SysCategory;

@Entity
@Table(name="sys_art")
public class SysArticle {
	private Long arcid;
	private String title;
	private String content;
	private SysCategory sc;
	
	@Id
//	@GeneratedValue(strategy=GenerationType.AUTO)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getArcid() {
		return arcid;
	}
	public void setArcid(Long arcid) {
		this.arcid = arcid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}

	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="cateid")
	public SysCategory getSc() {
		return sc;
	}
	public void setSc(SysCategory sc) {
		this.sc = sc;
	}
	
}

